kmpkg_check_linkage(ONLY_STATIC_LIBRARY)

kmpkg_from_gitee(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO kumo-hub/quirc
    REF "v${VERSION}"
    SHA512 aa6408a4835e738fcfc922da19c043aec7c3654e38a1d0c5384bd63138f1bd06afede139c75d5e2be4fe15b0c5c1c68dd25e1afd365365da65f58c3cddb48061
    HEAD_REF master
)

file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")

kmpkg_cmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
)

kmpkg_cmake_install()

kmpkg_copy_pdbs()

kmpkg_cmake_config_fixup()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
